package com.szh.zh.fallback;

import com.szh.zh.feign.StorageClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;


@Slf4j
public class StorageClientFallbackFactory implements FallbackFactory<StorageClient> {
    @Override
    public StorageClient create(Throwable cause) {
        return new StorageClient() {

            @Override
            public void deduct(String userId, Integer money) {
                log.error("扣用户余额 失败");
            }
        };
    }
}
